Skip to content

Bump unix xmlsec1 1 3 11#422

Merged
mxamin merged 3 commits intomasterfrom
bump-unix-xmlsec1-1-3-11
Apr 28, 2026
Merged

Bump unix xmlsec1 1 3 11#422
mxamin merged 3 commits intomasterfrom
bump-unix-xmlsec1-1-3-11

Conversation

@mxamin
Copy link
Copy Markdown
Collaborator

@mxamin mxamin commented Apr 28, 2026

No description provided.

mxamin added 2 commits April 27, 2026 18:19
xmlsec1 1.3.11 may call OPENSSL_cleanup() from the OpenSSL
backend during shutdown. OpenSSL cannot be reinitialized in the
same process after that cleanup runs.

Update the lifecycle test to call init() before shutdown(), run it
last, and stop testing shutdown/init reinitialization. Document the
new lifecycle constraint in the module docs and runtime docstrings.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the project’s bundled unix xmlsec1 dependency to 1.3.11 and adjusts docs/tests to accommodate upstream lifecycle changes (notably OpenSSL cleanup making shutdown effectively process-final).

Changes:

  • Bump unix xmlsec1 from 1.3.10 to 1.3.11 in build tooling and CI cache workflow defaults.
  • Update test ordering so the xmlsec shutdown test runs last, avoiding post-shutdown use.
  • Document the init/shutdown lifecycle constraints in both C docstrings and Sphinx docs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
build_support/lib_xmlsec_dependency_builder.py Bumps unix default xmlsec1_version to 1.3.11.
.github/workflows/cache_libs.yml Updates default XMLSEC1_VERSION to 1.3.11 for non-Windows caching.
tests/test_xmlsec.py Reworks module lifecycle test to avoid re-init after shutdown; sets iterations to 0.
tests/conftest.py Reorders tests to ensure shutdown-related test runs last.
src/main.c Updates init()/shutdown() docstrings to describe process-final shutdown constraint.
doc/source/modules/xmlsec.rst Adds lifecycle documentation explaining why shutdown is process-final.
Comments suppressed due to low confidence (1)

src/main.c:113

  • The docs now state that calling init() after shutdown() is unsupported/process-final, but PyXmlSec_PyInit currently allows it unconditionally. To make the runtime behavior match the documentation (and avoid upstream OpenSSL reinit failures), consider tracking a "shutdown called" state and raising a clear Python exception if init() is called after shutdown().
    "This is called upon library import and normally does not need to be\n"
    "called explicitly. It is only valid before shutdown() has been called.\n\n"
    "Calling init() after shutdown() is unsupported because upstream\n"
    "xmlsec1 1.3.11+ may call OPENSSL_cleanup() during shutdown, and OpenSSL\n"
    "cannot be reinitialized in the same process after that cleanup.\n";
static PyObject* PyXmlSec_PyInit(PyObject *self) {
   if (PyXmlSec_Init() < 0) {
        return NULL;
   }
   Py_RETURN_NONE;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.c
Comment thread tests/test_xmlsec.py
Comment thread tests/test_xmlsec.py Outdated
Comment thread tests/conftest.py Outdated
@mxamin mxamin merged commit 5e8b4e6 into master Apr 28, 2026
227 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants